#ifndef CHANGETIMEWIDGET_H
#define CHANGETIMEWIDGET_H

#include <QWidget>
#include <QPushButton>
#include <QLabel>
#include <QLineEdit>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QString>
#include <QMessageBox>
#include <QTableWidget>
#include <QVector>
#include <QComboBox>
#include <QHeaderView>
#include <QDialog>

#include "control/mycontrol.h"
#include "model/basemodel.h"
#include "model/stockrecordmodel.h"
#include "data/inoutstockdata.h"

class ChangeTimeWidget : public QWidget
{
    Q_OBJECT
public:
    explicit ChangeTimeWidget(QWidget *parent = nullptr);
    void init_Control();
    void init_Widget();
    void init_Connect();//初始化连接信号和槽
    void things_show();

private:
    QPushButton *returnBtn;
    QPushButton *changeReturnBtn;
    QPushButton *confirmBtn;
    QPushButton *changeBtn;
    QLineEdit *changeEdit;
    QComboBox *confirmCombo;
    QTableWidget *table;
    QHBoxLayout *btnLay;
    QHBoxLayout *changeUpLay;
    QVBoxLayout *vLay;
    QVBoxLayout *otherLay;

    QDialog *myDialog;
    BaseModel *model;
    MyControl *control;
    User *user;
    QVector<InOutStockData> inOutStock;
    int index=0;
    int row;


signals:
    void returnManager();

public slots:
    void on_retutrnBtn_cliked();
    void on_changeReturnBtn_cliked();
    void on_confirmBtn_cliked();
    void on_changeBtn_cliked(int row);
    void on_Index_Changed(int index);
};

#endif // CHANGETIMEWIDGET_H
